package com.easyfun.healthmagicbox.pojo;


import java.util.ArrayList;

import android.content.Context;
import android.util.SparseArray;

import com.easyfun.healthmagicbox.HealthBoxApplication;
import com.easyfun.healthmagicbox.R;
import com.easyfun.healthmagicbox.ormlite.HealthInputTypeEnum;
import com.easyfun.healthmagicbox.util.SharedPreferencesUtil;

public class ConstantData {
	public static final String xueya_gaoya = "xueya_gaoya";
	public static final String xuetang = "";
	public static final String xueya_diya = "";
	public static final String xueyang = "";
	
	public static final String ADD_PERSON = "ADD_PERSON";
	public static final String DOWNLOADING_PERSON = "DOWNLOADING_PERSON";
	public static final String DEFAULT_HEAD_ICON_FEMALE = "DEFAULT_HEAD_ICON_FEMALE";
	public static final String DEFAULT_HEAD_ICON_MALE = "DEFAULT_HEAD_ICON_MALE";
	public static final String DOCTORID = "doctorID";
	
	//after register, whether is first manually input
	//registered but not input manually
	public static final Integer ManualInputNo = 0;
	//has input manually
	public static final Integer ManualInputYes = 1;
	
	public static final String SDCARDFOLDER = "healthbox";
	
	public static SparseArray<String>  IdToNameMapping = new SparseArray<String> ();
	public static SparseArray<String>  HealthData = new SparseArray<String> ();
	private static final String DefaultServerURL = "http://www.kangbox.cn/cakephp/";
	
	public static final String PersonProfilePOSTURI = "mobilePersons/uploadpersonprofile";
	
	public static final String PersonProfileDownloadURI = "mobilePersons/downloadpersonprofile";
	public static final String PersonProfileRemoveURI = "mobilePersons/removepersonprofile";
	public static final String TOPRequestURI = "mobilePersons/toprequest";
	
	public static final String InputDatatPOSTURI = "mobilePersons/uploadinputdata";
	
	public static final String InputDataDownloadURI = "mobilePersons/downloadinputdata";
	public static final String InputDataDeleteURI = "mobilePersons/deleteinputdata";
	
	public static final String LoginURI = "mobileUsers/mobileuserlogin";
	
	public static final String UserRegisterURI = "mobileUsers/mobileuserregister";

	public static final String UserLoginURI = "mobileUsers/mobileuserlogin";
	public static final String UserChangePasswordURI = "mobileUsers/mobileuserchangepassword";
	public static final String UserForgetPasswordURI = "mobileUsers/forgetpassword";
	public static final String ServerHeartBeatURI ="mobileHeartBeat/heartbeatreceiver";
	

	public static final String UserSharePersonURI = "mobileUsers/shareperson";
	
	public static final String HMBUSERNAME = "username";
	public static final String HMBPERSONID = "personID";
	public static final String nopicFileName = "bighead.png";
	public static final String UserToPersonsDownURI = "mobileUsers/mobileusertopersonsdown";
	public static final String UserToPersonsUpURI = "mobileUsers/mobileusertopersonsup";
	public static final String NoPicture = "NOPICTURE";
	public static final ArrayList<String> titles = new ArrayList<String>();
	public static final ArrayList<String> allerges = new ArrayList<String>();
	public static final ArrayList<String> diseases = new ArrayList<String>();
	public static final ArrayList<String> life = new ArrayList<String>();
	public static final ArrayList<String> eat = new ArrayList<String>();
	public static final ArrayList<String> bodyissues = new ArrayList<String>();
	public static final String DoctorProfileDownloadURI = "mobileDocSuggestions/downloadDoctorProfile";

	public static final String DoctorDownloadSuggesionURI = "mobileDocSuggestions/downloadsuggestion";
	
	public static final String PersonQuestionPOSTURI = "mobileDocSuggestions/uploadQuestion";
	public static final String PersonQuestionDownloadURI = "mobileDocSuggestions/downloadQuestion";
	public static final String PersonQuestionDeleteURI = "mobileDocSuggestions/deleteQuestion";
	
	public static final String ReferenceDataDownloadURI = "mobileDocSuggestions/getReferenceByID";
	public static final String ReferenceDataListDownloadURI = "mobileDocSuggestions/getReferenceIDList";

	public static final String ConfigurationDownloadURI = "mobileUsers/downloadconfiguration";
	public static final String PictureDownloadURI = "mobilePersons/downloadpictures";
	public static final String PictureUploadURI = "mobilePersons/uploadpictures";
	public static final String AlarmClockDownloadURI = "mobileAlarmClock/downloadalarm";
	public static final String AlarmClockUploadURI = "mobileAlarmClock/uploadalarm";
	public static final String PictureDeleteURI = "mobilePersons/deletepicture";
	public static final String SharePersionByCodeURI = "mobileUsers/sharepersonbycode";
	public static final String GenerateInvitedcode = "mobilePersons/generateinvitedcode";
	public static final String INPUT_TYPE = "INPUT_TYPE";
	
	
	//this part is for querying person data
	public static final String CUSTOM_DIALOG_INPUT_DATA= "inputData";
	public static final String CUSTOM_DIALOG_RETURN_DATA = "returnData";
	public static final String CUSTOM_DIALOG_TITLE = "title";
	public static final String CUSTOM_DIALOG_MULIT_CHOICE_FLAG = "multiChoiceFlag";
	public static final String CUSTOM_DIALOG_INVOKER = "invoker";
	public static final int CUSTOM_DIALOG_REQUST_ID = 0x00010001;
	
	public static final int REFERENCE_DATA_ANY = 0x00000000;
	
	public static String getServerURL(Context ctx) {
		 
		return SharedPreferencesUtil.getInstance(ctx).getServerURL(DefaultServerURL);
	}


	public static void setServerURL(String serverURL,Context ctx) {
		SharedPreferencesUtil.getInstance(ctx).setServerURL(serverURL);
	}


	static
	{

		titles.add(0, "自己");
		titles.add(1, "父亲");
		titles.add(2,"母亲");
		titles.add(3,"儿子");
		titles.add(4,"女儿");
		titles.add(5,"爷爷");
		titles.add(6,"奶奶");
		titles.add(7,"外公");
		titles.add(8,"外婆");
		titles.add(9,"兄弟");
		titles.add(10,"姐妹");
		titles.add(11,"其他");
		
		allerges.add(0, "花粉");
		allerges.add(1, "酒");
		allerges.add(2, "海鲜");
		allerges.add(3, "其他");
		

		diseases.add(0, "糖尿病");
		diseases.add(1, "高血压");
		diseases.add(2, "高血脂");
		diseases.add(3, "冠心病");
		diseases.add(4, "其他");

		life.add(0, "朝九晚五");
		life.add(1, "夜猫子");
		life.add(2, "自由自在，无规律");
		life.add(3, "初为父母");
		life.add(4, "小宝宝");
		life.add(5, "学生");
		life.add(6, "退休在家");
		life.add(7, "其他");
		

		eat.add(0, "不吃早点");
		eat.add(1, "不定时吃饭");
		eat.add(2, "喜欢辛辣");
		eat.add(3, "喜欢吃肉");
		eat.add(4, "喜欢吃素");
		eat.add(5, "喜欢零食");
		eat.add(6, "喝水较少");
		eat.add(7, "减肥中");
		eat.add(8, "其他");

		bodyissues.add(0, "经常便秘");
		bodyissues.add(1, "经常失眠");
		bodyissues.add(2, "经常头疼");
		bodyissues.add(3, "需要较长睡眠");
		bodyissues.add(4, "其他");
		
		IdToNameMapping.put(HealthInputTypeEnum.RUNKM.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.paobu)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.paobu_qianmi));
		IdToNameMapping.put(HealthInputTypeEnum.RUNMINS.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.paobu)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.paobu_fenzhong));

		IdToNameMapping.put(HealthInputTypeEnum.HEJIU.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.hejiu)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.hejiu_ping));
		

		IdToNameMapping.put(HealthInputTypeEnum.CHOUYAN.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.chouyan)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.chouyan_gen));

		IdToNameMapping.put(HealthInputTypeEnum.YINSHIKALULI.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.yinshi)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.yinshi_kaluli));


		IdToNameMapping.put(HealthInputTypeEnum.FUWOCHENG.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.fuwocheng)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.yundong_ge));

		IdToNameMapping.put(HealthInputTypeEnum.YINTIXIANGSHANG.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.yitixiangshang)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.yundong_ge));

		IdToNameMapping.put(HealthInputTypeEnum.YANGWOQIZUO.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.yangwoqizuo)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.yundong_ge));

		
		IdToNameMapping.put(HealthInputTypeEnum.XUETANG_CANHOU.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.xuetang_canhou) +"%s"+
				HealthBoxApplication.getInstance().getString(R.string.xuetang_danwei));
		IdToNameMapping.put(HealthInputTypeEnum.XUETANG_CANQIAN.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.xuetang_canqian)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.xuetang_danwei));
		IdToNameMapping.put(HealthInputTypeEnum.XUEYA_DIYA.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.xueya_diya)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.xueya_danwei));
		IdToNameMapping.put(HealthInputTypeEnum.XUEYA_GAOYA.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.xueya_gaoya)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.xueya_danwei));
		

		IdToNameMapping.put(HealthInputTypeEnum.XUEYANG.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.xueyang)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.xueyang_danwei));
		
		IdToNameMapping.put(HealthInputTypeEnum.XINLV.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.xilv)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.xilv_danwei));
		
		IdToNameMapping.put(HealthInputTypeEnum.TIWEN.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.tiwen)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.tiwen_danwei));
		

		IdToNameMapping.put(HealthInputTypeEnum.TIZHONG.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.tizhong)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.tizhong_gongjin));
		
		IdToNameMapping.put(HealthInputTypeEnum.SHENGAO.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.shengao)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.shengo_limi));
		

		IdToNameMapping.put(HealthInputTypeEnum.XIONGWEI.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.xiongwei)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.shengo_limi));

		IdToNameMapping.put(HealthInputTypeEnum.TUNWEI.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.tunwei)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.shengo_limi));

		IdToNameMapping.put(HealthInputTypeEnum.YAOWEI.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.yaowei)+"%s"+
				HealthBoxApplication.getInstance().getString(R.string.shengo_limi));
		


		//
		HealthData.put(HealthInputTypeEnum.RUNKM.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.paobu)+ "(" +
				HealthBoxApplication.getInstance().getString(R.string.paobu_qianmi) + ")");
		HealthData.put(HealthInputTypeEnum.RUNMINS.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.paobu)+ "(" +
				HealthBoxApplication.getInstance().getString(R.string.paobu_fenzhong) + ")");

		HealthData.put(HealthInputTypeEnum.HEJIU.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.hejiu)+ "(" +
				HealthBoxApplication.getInstance().getString(R.string.hejiu_ping) + ")");
		

		HealthData.put(HealthInputTypeEnum.CHOUYAN.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.chouyan)+ "(" +
				HealthBoxApplication.getInstance().getString(R.string.chouyan_gen) + ")");

		HealthData.put(HealthInputTypeEnum.YINSHIKALULI.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.yinshi)+ "(" +
				HealthBoxApplication.getInstance().getString(R.string.yinshi_kaluli) + ")");


		HealthData.put(HealthInputTypeEnum.FUWOCHENG.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.fuwocheng)+ "(" +
				HealthBoxApplication.getInstance().getString(R.string.yundong_ge)  +")");

		HealthData.put(HealthInputTypeEnum.YINTIXIANGSHANG.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.yitixiangshang)+ "(" +
				HealthBoxApplication.getInstance().getString(R.string.yundong_ge) + ")");

		HealthData.put(HealthInputTypeEnum.YANGWOQIZUO.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.yangwoqizuo)+ "(" +
				HealthBoxApplication.getInstance().getString(R.string.yundong_ge) + ")");

		
		HealthData.put(HealthInputTypeEnum.XUETANG_CANHOU.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.xuetang_canhou) + "(" +
				HealthBoxApplication.getInstance().getString(R.string.xuetang_danwei) + ")");
		HealthData.put(HealthInputTypeEnum.XUETANG_CANQIAN.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.xuetang_canqian)+ "(" +
				HealthBoxApplication.getInstance().getString(R.string.xuetang_danwei) + ")");
		HealthData.put(HealthInputTypeEnum.XUEYA_DIYA.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.xueya_diya)+ "(" +
				HealthBoxApplication.getInstance().getString(R.string.xueya_danwei)  + ")");
		HealthData.put(HealthInputTypeEnum.XUEYA_GAOYA.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.xueya_gaoya)+ "(" +
				HealthBoxApplication.getInstance().getString(R.string.xueya_danwei)  + ")");
		

		HealthData.put(HealthInputTypeEnum.XUEYANG.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.xueyang)+ "("+
				HealthBoxApplication.getInstance().getString(R.string.xueyang_danwei) + ")");
		
		HealthData.put(HealthInputTypeEnum.XINLV.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.xilv)+"(" +
				HealthBoxApplication.getInstance().getString(R.string.xilv_danwei) + ")");
		
		HealthData.put(HealthInputTypeEnum.TIWEN.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.tiwen)+ "(" +
				HealthBoxApplication.getInstance().getString(R.string.tiwen_danwei) + ")");
		

		HealthData.put(HealthInputTypeEnum.TIZHONG.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.tizhong)+ "(" +
				HealthBoxApplication.getInstance().getString(R.string.tizhong_gongjin) + ")");
		
		HealthData.put(HealthInputTypeEnum.SHENGAO.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.shengao)+ "(" +
				HealthBoxApplication.getInstance().getString(R.string.shengo_limi) + ")");
		

		HealthData.put(HealthInputTypeEnum.XIONGWEI.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.xiongwei)+ "(" +
				HealthBoxApplication.getInstance().getString(R.string.shengo_limi) + ")");

		HealthData.put(HealthInputTypeEnum.TUNWEI.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.tunwei)+ "(" +
				HealthBoxApplication.getInstance().getString(R.string.shengo_limi) + ")");

		HealthData.put(HealthInputTypeEnum.YAOWEI.toInteger(),
				HealthBoxApplication.getInstance().getString(R.string.yaowei)+ "(" +
				HealthBoxApplication.getInstance().getString(R.string.shengo_limi) + ")");


		
	}
	
}
